<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>VUE条件判断-if</title>
        <script type="text/javascript" src="https://unpkg.com/vue/dist/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <p>{{message}}</p>
            <template v-if="showTemplate">
                <div>
                    <span>QQQ</span>
                    <span>{{hideMsg}}</span>
                    <span>EEE</span>
                </div>
            </template>
        </div>
    </body>
    <script type="text/javascript">
        var vueObj = new Vue({
            el: '#app',
            data: {
                message: '你好，我是消息详情！',
                hideMsg: '这是隐藏的消息',
                showTemplate: false
            },
            methods: {
                sayHello: function() {
                    return "Hello!";
                }
            }
        });
    </script>
</html>